package com.china08.yxyapi.repository.db;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.transaction.annotation.Transactional;

import com.china08.yxyapi.entity.db.res.YxyResVideoBlock;

public interface YxyResVideoBlockRepository extends JpaRepository<YxyResVideoBlock, String> {

    YxyResVideoBlock findByMd5AndChunk(String md5, Integer chunk);

    List<YxyResVideoBlock> findByMd5(String md5);

    @Transactional
    @Modifying
    Integer deleteByMd5(String md5);

}
